package com.example.learnnacos;

import com.example.learnnacos.tasks.ApiJobProcessor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

    @RestController
    @Slf4j
    @RequestMapping("/powerjob")
    public class PowerJobController {

        @Autowired
        private ApiJobProcessor apiJobProcessor;

        @RequestMapping("/runjob")
        public boolean runJob() {
            apiJobProcessor.runJob();
            return true;
        }
    }
